<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <!-- 全屏 -->
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <!-- 上方栏显示 -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <!-- 不自动识别号码 -->
    <meta name="format-detection" content="telephone=no">
    <!-- Include js plugin -->
    <title><{if $type == 3}>作业列表<{else if $type == 4}>我的考试<{/if}></title>
    <link rel="stylesheet" href="/static/wap/skin/css/layout.css">
    <link rel="stylesheet" href="/static/wap/skin/css/demos.css">
</head>
<body>
<header class="brB">
    <div class="h_top">
        <div class="hLeft"><a href="/" class="icoH icoReturn mt20"></a></div>
        <div class="hCenter"><span class="tit c-3ac9af"><{if $type == 3}>作业列表<{else if $type == 4}>我的考试<{/if}></span></div>
    </div>
</header>
<div class="warp">
    <div class="fix">
        <!--E star-->
        <input type="hidden" id="page" name="id" value="1" />
        <div class="select_listbox odr_b">
            <div class="layout-box tac brB" id="select_ify">
                <div class="box-col">
                    <div class="citytit odr_r">
                        <{if empty($conditions.subject_id)}>
                        <a href="javascript:;">默认</a>
                        <{else}>
                            <{foreach from=$subject item=item}>
                            <{if $conditions.subject_id == $item.id}>
                            <a href="/my/classes/volume_list/<{$type}>/<{$item.id}>"><{$item.title}></a>
                            <{/if}>
                            <{/foreach}>
                        <{/if}>
                        <i></i>
                        <s></s>
                    </div>
                    <div class="citybox">
                        <{foreach from=$subject item=item}>
                        <a href="/my/classes/volume_list/<{$type}>/<{$item.id}>"><{$item.title}></a>
                        <{/foreach}>
                    </div>
                </div>
                <!-- <div class="box-col">
                    <div class="citytit">
                        <a href="javascript:;">排序</a>
                        <i></i>
                        <s></s>
                    </div>
                    <div class="citybox">
                        <a href="javascript:;">排序1</a>
                        <a href="javascript:;">排序2</a>
                    </div>
                </div> -->
                <div class="box-col">
                   
                </div>
            </div>
        </div>
        <!--E end-->
    </div>


    <div class="fix b-FFFFFF">
        <ul  id="layui_flow">
            <{foreach from=$test_volume_list item=item}>
            <li class="p20 brB">
            <a href="/my/tiku/start_volume_test/<{$item.id}>">
                <div class="box-col" style="padding-left:20px;">
                    <div class="h40 oh fs34"><{if $type == 2}>作业<{else if $type == 3}>考试<{/if}>【<{$item.name}>】<{$item.pname}></div>
                    <div class="h40 oh c-666666 pt10">数学</div>
                    <div class="fs26 pt10">
                        <span class="r fs26">
                            <a href="/my/tiku/start_volume_test/<{$item.id}>" class=" c-999999">开始做题</a> | 
                            <!-- <a href="/my/classes/volume_historys" class=" c-999999">做题记录</a> -->
                        </span>
                    </div>
                 
                </div>
                </a>
            </li>
            <{/foreach}>
        </ul>
    </div>
</div>
<script src="/static/public/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="/static/wap/weui/js/jquery.min.js"></script>
<script src="/static/wap/weui/js/jquery-weui.min.js"></script>
<script src="/static/wap/skin/js/demos.js"></script>
<link href="/static/public/layer/src/css/layui.css" rel="stylesheet">
<script src="/static/public/layer/src/layui.js"></script>
<script>
$.fn.Dashenselect("#select_ify",".box-col",".citytit",".citybox","i","s","a","click","curr","hover","selected");
layui.use('flow', function(){
    var flow = layui.flow;
    flow.load({
        elem: '#layui_flow' //流加载容器
        ,isAuto:false
        ,scrollElem: '#layui_flow' //滚动条所在元素，一般不用填，此处只是演示需要。
        ,done: function(page, next){ //执行下一页的回调
            //模拟数据插入
            setTimeout(function(){
                var lis = [];
                if(page > 1){
                    $.ajax({
                        type: "GET",
                        url: "/my/classes/volume_list/<{$type}>/<{$conditions.subject_id}>/<{$conditions.home_work_name}>/"+page,
                        dataType:"json",
                        success: function(result){
                            if(result){
                                $.each(result,function(i, n){
                                    if("<{$type}>" == 3){
                                        var name = "作业";
                                    }else if("<{$type}>" == 4){
                                        var name = "考试";
                                    }
                                    var html = '<li class="p20 brB">';
                                    html += '<div class="box-col" style="padding-left:20px;">';
                                    html += '<div class="h40 oh fs34">'+name+'名称：【'+n.title+'】'+n.pname+'</div>';
                                    html += '<div class="h40 oh c-666666 pt10">添加老师：'+n.teacher_name+'</div>';
                                    html += '<div class="fs26 pt10">';
                                    html += name+'时长：<span class="c-FF0000 mr10">'+n.timeout+'分钟</span>';
                                    html += '<span class="r fs26">';
                                    html += '<a href="/my/tiku/start_volume_test/'+n.volume_id+'/<{$type}>" class=" c-999999">开始做题</a> |'; 
                                    html += '<a href="/my/classes/volume_historys/'+n.pid+'/<{$type}>" class=" c-999999">做题记录</a>';
                                    html += '</span>';
                                    html += '</div>';
                                    html += '</div>';
                                    html += '</li>';
                                    $("#layui_flow").find("li:last").after(html)
                                    // console.log(html)
                                });

                            }
                        }
                    });
                }
                
            //执行下一页渲染，第二参数为：满足“加载更多”的条件，即后面仍有分页
            //pages为Ajax返回的总页数，只有当前页小于总页数的情况下，才会继续出现加载更多
                next(lis.join(''), page < "<{$count-1}>"); //假设总页数为 10
            }, 500);
        }
    });
});
</script>
</body>
</html>